<div class="col-lg-12">
	<!--当前位置 start-->
	<div class="row">
		<div class="col-lg-12">
			<ol class="breadcrumb">
				<li><i class="fa fa-home mrg-r-sm"></i>首页</li>
				<li class="active"><span>会员卡列表</span></li>
			</ol>
		</div>
	</div>
	<!--当前位置 end-->
	
	<!--代码写在这里-->
	<div class="row">
			<div class="col-lg-12">
				<header class="main-box-header clearfix ">
					<div class="filter-block pull-right">
						
						<!--搜索框 Start-->
						<div class="form-group pull-left">
							<input type="text" class="form-control" ng-model="search.card_id" placeholder="请输入会员卡号">
						</div>
						<div class="form-group pull-left">
							<input type="text" class="form-control" ng-model="search.name" placeholder="请输入老人姓名" >
						</div>
						<div class="form-group pull-left">
							<input type="text" class="form-control" ng-model="search.phone" placeholder="请输入联系电话">
						</div>
                        <div class="form-group pull-left">
                            <input type="text" class="form-control" ng-model="search.cardId" placeholder="请输入身份证号">
                        </div>
						<div class="form-group pull-left">
							<input type="text" class="form-control" ng-model="search.em_name" placeholder="请输入紧急联系人">
						</div>
						<div class="form-group pull-left">
							<input type="text" class="form-control" ng-model="search.em_phone" placeholder="请输入紧急联系电话">
						</div>
						<!--搜索框 End-->
						<a class="btn btn-success pull-right  form-group" ng-click="searchCard(search)">
							 <i class="fa fa-search "></i> 搜索 
						</a>
						<a class="btn btn-primary pull-right form-group" href="#/card/create">
						 	<i class="fa fa-plus-circle fa-lg"></i> 添加
						</a>
						<a class="btn btn-primary pull-right form-group" >
							<i class="fa fa-plus-circle fa-lg"></i> 批量导入
						</a>
					</div>
				</header>
				<div class="main-box no-header clearfix">
					<div class="main-box-body clearfix" >
						<div class="table-responsive">
							<table class="table table-hover table-striped text-center">
								<thead >
									<tr>
										<th class="text-center"><span>会员卡号</span></th>
										<th class="text-center"><span>持卡人</span></th>
										<th class="text-center"><span>资金</span></th>
                                        <th class="text-center"><span>充值次数</span></th>
										<th class="text-center"><span>创建时间</span></th>
										<th class="text-center"><span>会员卡状态</span></th>
										<th class="text-center"><span>会员卡类型</span></th>
										<th class="text-center"><span>操作</span></th>
									</tr>
								</thead>
								<tbody >
									<tr role="row" class="odd"  ng-repeat="item in list">
										<td class="sorting_1">{{item.card_id}}</td>
										<td>{{item.member.name}}</td>
										<td>{{item.fund}}</td>
                                        <td>{{item.chargeCount}}</td>
										<td>{{item.create_time}}</td>
										<td ng-if="item.status == 1">已启用</td>
										<td ng-if="item.status == 2">已停用</td>
                                        <td ng-if="item.status == 0">未分配的原始会员卡</td>
                                        <td ng-if="item.status == -1">已注销</td>
                                        <!--<td ng-if="item.status == dispatched">已启用</td>-->
										<!--<td ng-if="item.status == 'origin'">未分配的原始会员卡</td>-->
										<!--<td ng-if="item.status == 'dispatched'">已经分配的会员卡</td>-->
										<!--<td ng-if="item.status == 'deserted'">废弃的会员卡</td>-->
										 <td>{{item.type}}</td>
										<td style="width: 30%;">
											<!--<a  class="table-link" href="#/card/edit/{{item._id}}">
												<span class="fa-stack">
												<i class="fa fa-square fa-stack-2x"></i>
												<i class="fa fa-pencil fa-stack-1x fa-inverse"></i>
												</span>
											</a>-->
											<a class="btn btn-info" href="#/card/setup/{{item._id}}">设置</a>
											<a class="btn btn-primary" href="#/card/recharge/{{item._id}}" ng-if="item.member.name != undefined && item.status == 1">充值</a>
											<a class="btn btn-danger" href="#/card/consume/{{item._id}}" ng-if="item.member.name != undefined && item.status == 1">消费</a>
											<a class="btn btn-warning" href="#/card/history/{{item.card_id}}" ng-if="item.member.name != undefined && item.status == 1">消费记录</a>
										</td>
									</tr>
								</tbody>
							</table>
						</div>
						<ul class="pagination pull-right">
                            <li><a >总条数：{{count}}</a></li>
                            <li><a >总页数：{{totalPage}}</a></li>
					        <li><a ng-click="changePage(1)">首页</a></li>
					        <li><a ng-show="currentPage>1" ng-click="changePage(currentPage-1)"><i class="fa fa-chevron-left"></i></a></li>
					        <!--<li><span ng-show="frontdotShow">…</span></li>-->
					        <li ng-repeat="item in pageList" ng-click="changePage(item.number)" class="{{item.active}}"><a>{{item.number}}</a></li>
					        <!--<li><span ng-show="backdotShow">…</span></li>-->
					        <li><a ng-show="currentPage<totalPage" ng-click="changePage(currentPage+1)"><i class="fa fa-chevron-right"></i></a></li>
					        <li><a ng-click="changePage(totalPage)">尾页</a></li>
					    </ul>
					</div>
				</div>
				 
			</div>
		</div>
	<!--代码写在这里  end-->
</div>